home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectDraw / GammaControl / readme.txt < prev    next >
Encoding:
Text File  |  2001-10-10  |  1.4 KB  |  41 lines

  1. //-----------------------------------------------------------------------------
  2. // 
  3. // Sample Name: GammaControl Sample
  4. // 
  5. // Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved.
  6. // 
  7. //-----------------------------------------------------------------------------
  8.  
  9.  
  10. Description
  11. ===========
  12.   GammaControl demonstrates how to use IDirectDrawGammaControl to adjust
  13.   how bright the system displays the DirectDraw surface.
  14.  
  15. Path
  16. ====
  17.   Source: DXSDK\Samples\Multimedia\DDraw\GammaControl
  18.  
  19.   Executable: DXSDK\Samples\Multimedia\DDraw\Bin
  20.  
  21. User's Guide
  22. ============
  23.   Click the left mouse button to decrease the gamma ramp or the right mouse button
  24.   to increase it.  Press the ESC key to quit the program.
  25.  
  26. Programming Notes
  27. =================
  28.   For details on how to setup a full-screen DirectDraw app, see the FullScreenMode 
  29.   sample. 
  30.   
  31.   To adjust the gamma, first check to see if the device supports it.  Call
  32.   IDirectDraw::GetCaps to check if DDCAPS2_PRIMARYGAMMA is set.  If it is, then
  33.   you can set the gamma ramp by calling IDirectDrawGammaControl::SetGammaRamp.  
  34.   
  35.   For simplicity this sample creates a gamma ramp which is linear for all 
  36.   color components.  The ramp runs from 0 at index 0 linearly up to a user 
  37.   defined number at index 255 for each of the color components.  However, the ramp 
  38.   does not need to be linear.
  39.   
  40.   
  41.